<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>筛选数据元素</title>
<script>
   var arr = [2, 0, 6, 1, 77, 0, 52, 0, 25, 7];
   var newArr = [];
   var j = 0;
   for (var i = 0; i < arr.length; i++) {
     if (arr[i] >= 10) {
       //newArr[j++] = arr[i];    // 新数组索引号从0开始，依次递增
    newArr.push(arr[i]);
     }
   }
   console.log(newArr);       // 输出结果：(3) [77, 52, 25]

  </script>
 </head>
 <body>
  <h1>筛选数组元素</h1>
 </body>
</html>


；